package com.qfedu.model;

import java.math.BigDecimal;

/**
 * @author 王海龙
 * @date 2023-04-18
 */
public class CartItem {
    private int bid;//商品栏id
    private int cid;//绑定购物车id
    private int Id;//商品id
    private String name;//商品名称
    private BigDecimal price;//商品价格
    private int count;//商品数量
    private BigDecimal totalPrice;//商品总价格

    public CartItem(int id, String name, BigDecimal price, int count, BigDecimal totalPrice) {
        Id = id;
        this.name = name;
        this.price = price;
        this.count = count;
        this.totalPrice = totalPrice;
    }

    public CartItem(int cid, int id, String name, BigDecimal price, int count, BigDecimal totalPrice) {
        this.cid = cid;
        Id = id;
        this.name = name;
        this.price = price;
        this.count = count;
        this.totalPrice = totalPrice;
    }

    public CartItem(int bid, int cid, int id, String name, BigDecimal price, int count) {
        this.bid = bid;
        this.cid = cid;
        Id = id;
        this.name = name;
        this.price = price;
        this.count = count;
    }

    @Override
    public String toString() {
        return "CartItem{" +
                "bid=" + bid +
                ", cid=" + cid +
                ", Id=" + Id +
                ", name='" + name + '\'' +
                ", price=" + price +
                ", count=" + count +
                ", totalPrice=" + totalPrice +
                '}';
    }

    public int getBid() {
        return bid;
    }

    public void setBid(int bid) {
        this.bid = bid;
    }

    public int getCid() {
        return cid;
    }

    public void setCid(int cid) {
        this.cid = cid;
    }

    public int getId() {
        return Id;
    }

    public void setId(int id) {
        Id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public CartItem() {
    }

    public CartItem(int bid, int cid, int id, String name, BigDecimal price, int count, BigDecimal totalPrice) {
        this.bid = bid;
        this.cid = cid;
        Id = id;
        this.name = name;
        this.price = price;
        this.count = count;
        this.totalPrice = totalPrice;
    }

}
